package org.spbsu.apco.server.system;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Describes computing node, aka machine normally identified with a MAC address.
 *
 * APCO project of Saint Petersburg State University
 * User: panshemi
 * Date: 1/21/12
 * Time: 12:35 AM
 */
@XmlRootElement(name = "Node")
public class Node {
    private final String mac;
    private ConcurrentHashMap<String, Runner> runnerMap = new ConcurrentHashMap<String, Runner>();

    public Node(String mac) {
        this.mac = mac;
    }

    public String getMac() {
        return mac;
    }

    public void addRunner(Runner runner) {
        runnerMap.put(runner.getId(), runner);
    }
}
